import base
from imgaug import augmenters as iaa
import time
import random

start = time.time()
ids = base.load_ids()
handle_count = 200


def handle(idss,aug,key):
    for id in idss:

        new_id = "%s-%s"%(id,key)
        # base.augmenttation_handle(id,aug,new_id,False,0.99)
        print("Spent:%f"%(time.time() -start))

handle(random.sample(ids,handle_count),iaa.Flipud(1),'flipud')
handle(random.sample(ids,handle_count),iaa.Fliplr(1),'fliplr')
handle(random.sample(ids,handle_count),iaa.Affine(rotate=90),'rotate_90')
handle(random.sample(ids,handle_count),iaa.Affine(rotate=270),'rotate_270')